// props数据项配置
const colList = {
    type: Array,
    default: () => []
}

const width = {
    type: String,
    default: '120px'
 }

const position = {
    type: Object,
    default: () => {
        return {
            top: 0,
            left: 0,
            right: 0,
            bottom: 0
        }
    }
}

// 得到位置方法
export const getPosition = (props) => {
    const { top, left, right ,bottom} = { ...props.position }
    const arrPos = [top, left, right ,bottom] 
    for(let i = 0; i<arrPos.length;i++) {
        arrPos[i] = arrPos[i]===0? false : arrPos[i]
    }
    return {
        top: arrPos[0],
        left: arrPos[1],
        right: arrPos[2],
        bottom: arrPos[3]
    }
}

 export default {
    colList,
    width,
    position
 }